<extend name="Base/common"/>
<block name="TITLE"><title>世果365</title></block>
<block name="body">

<!--轮播图-->
<div class="am-slider am-slider-default am-margin-0"  data-am-flexslider="{controlNav:false,directionNav: false, slideshow: true}" id="demo-slider-0"  style="background: #f6f7f2;" >
    <ul class="am-slides">
        <volist name='list' id='vohomepage'>
            <li><a href="{$vohomepage.urlstr}">
                <img src="{$vohomepage.fileurl}" style="margin-bottom: 2px; " />
            </a></li>
        </volist>
    </ul>

</div>
    <!--3块快速导航-->
    <!--<div class="am-g am-slider am-slider-default am-padding-top  am-margin-0" style="background: #f6f7f2;">-->
        <!--<div class="am-u-sm-4 am-padding-0 am-margin-left-0" style="text-align: center;"><a href="{:U('Product/ProductList')}?"><img  src="__IMG__/QBSP.png" style="width:99%;min-width: 97.5%;" /></a></div>-->
        <!--<div class="am-u-sm-4 am-padding-0" style="text-align: center;"><a href="{:U('Pricelist/pricelist')}"><img src="__IMG__/JMB.png" style="width:99%;min-width: 99%;" /></a></div>-->
        <!--&lt;!&ndash;<div class="am-u-sm-4 am-padding-0" style="text-align: center;"><a href="{:U('Agent/agent')}"><img src="__IMG__/SGDG.png" style="width:99%;min-width: 99%;" /></a></div>&ndash;&gt;-->
        <!--<div class="am-u-sm-4 am-padding-0" style="text-align: center;"><a href="{:U('Product/ProductList')}?label=tj&chinese=世果爆款"><img src="__IMG__/SGBK.png" style="width:99%;min-width: 99%;" /></a></div>-->
    <!--</div>-->
    <div class="am-slider am-slider-default am-padding-top "  data-am-flexslider="{directionNav: false, slideshow: true}"  >
        <ul class="am-slides">
            <volist name='hotsales' id='hotsale'>
                <li style="margin-top: 2px;"><a href="{$hotsale.urlstr}"><img src="{$hotsale.fileurl}" /></a></li>
            </volist>
        </ul>
    </div>
    <!--商品列表-->
    <volist name="goodslists" id="goodslist">
        <div data-am-widget="list_news" class="am-list-news am-list-news-default">
            <!--列表标题-->
            <div class="am-list-news-hd am-cf">
                <!--带更多链接-->
                <a href="{:U('Product/productlist')}" class="" style="border-bottom: 1.5px solid #3EACFF">
                    <span class="am-badge am-badge-secondary am-padding-xs am-radius am-padding-horizontal-sm" style="font-size: small;background-color: #3eacff!important;">{$goodslist.name}</span>
                    <span class="am-list-news-more am-fr am-padding-bottom-0" >更多 &raquo;</span>
                </a>
            </div>
            <div class="am-list-news-bd">
                <ul class="am-list am-g">
                    <volist name='goodslist["good"]' id='goods'>
                        <li class=" am-list-item-desced am-list-item-thumbed am-list-item-thumb-left " style="width: 100%;border-top:none;margin-bottom: 0px!important;">
                                <div class="am-margin-0 am-g">
                                    <a href="{:U('Product/productdetails')}?pid={$goods.id}">
                                        <div class="am-radius am-u-sm-3 am-padding-0" style="">
                                            <img src="{$goods.imgurl}?imageView2/1/w/200/h/200/q/100" style="width: 100%"  />
                                        </div>
                                    </a>
                                    <div class="am-list-main am-u-sm-9">
                                        <a href="{:U('Product/productdetails')}?pid={$goods.id}">
                                            <div class="am-primary" style="width:10em;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
                                                {$goods.name}
                                            </div>
                                        </a>
                                        <div class="am-g">
                                            <div class="am-padding-0 am-u-sm-9">
                                                <div class="am-margin-0 am-badge am-badge-secondary am-radius " style="padding: 3px;background-color: #3eacff!important;">
                                                    <span class="" style="font-size:13px;font-weight:300">{$goods.quantity}&nbsp;</span>
                                                </div>
                                                <!--<if condition="$goods.limit_num gt 0">-->
                                                    <!--<div class="am-margin-0 am-badge am-badge-danger am-radius am-u-sm-6" style="padding: 3px;">-->
                                                        <!--<span style="font-size:8px;font-weight:300">每人每天限购{$goods.limit_num}份</span>-->
                                                    <!--</div>-->
                                                <!--</if>-->
                                                <div class="am-u-sm-12 am-padding-horizontal-0  am-padding-top-xs">
                                                    <span style="font-size: 1.4rem">平台价<span class="am-text-danger">￥{$goods.minprice}</span></span>/
                                                    <span style="font-size: 1.4rem">会员价<span class="am-text-danger">￥{$goods.contract_price|default=$goods['minprice']}</span></span>
                                                </div>
                                                <!--<div class="" style="color:#777;font-size: 13px;width:9em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">-->
                                                    <!--{$goods.intro}-->
                                                <!--</div>-->
                                            </div>
                                            <div class="am-text-right am-u-sm-3 am-padding-0">
                                                <if condition="strpos($goods['tagarray'],'SINGLE')">
                                                        <a href="{:U('BuyNow/add',array('id'=>$goods['id']))}"><i class="am-text-danger am-icon am-icon-credit-card am-icon-sm" data-id="{$goods.id}"  id="{$goods.id}"   style="width:2em;height: 2em"></i></a>
                                                    <else/>
                                                        <if condition="($goods.iscart eq true)">
                                                            <img data-id="{$goods.id}" class="function" id="del_{$goods.id}" src="__IMG__/removecart.png" onclick="dele(this)" style="width:35px;height: 30px;" />
                                                            <img data-id="{$goods.id}" class="" id="add_{$goods.id}" src="__IMG__/addcart.png" onclick="add(this)" style="width:35px;height: 30px;display: none;" />
                                                        <else/>
                                                            <img data-id="{$goods.id}" class="" id="del_{$goods.id}" src="__IMG__/removecart.png" onclick="dele(this)" style="width:35px;height: 30px;display: none;" />
                                                            <img data-id="{$goods.id}" class="function" id="add_{$goods.id}" src="__IMG__/addcart.png" onclick="add(this)" style="width:35px;height: 30px;" />
                                                        </if>
                                                </if>
                                                <div>
                                                    <span style="color:#777;font-size:smaller">库存:{$goods.inventory}</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div>
                                            <!--<if condition="$user['contract_level'] gt 0">-->
                                                <!--<span class=" am-text-warning" style="font-size: larger">￥{$goods.contract_price}.0</span>-->
                                            <!--</if>-->
                                            <!--<if condition="$user['contract_level'] eq 0">-->
                                                <!--<span class=" am-text-warning" style="font-size: larger">￥{$goods.minprice}.0</span>-->
                                            <!--</if>-->

                                        </div>
                                    </div>
                                </div>
                        </li>
                    </volist>
                </ul>
            </div>
        </div>
    </volist>
    <script>
        function add(o){
            var pid=$(o).data('id');
            var url = "{:U('Pricelist/addToCart')}";
            $('#add_'+pid).hide();
            $('#del_'+pid).show();
            $.post(url,{pid:pid},function(msg){
            });
        }
       function dele(o){
           var pid=$(o).data('id');
           var url = "{:U('Pricelist/delFromCart')}";
           $('#add_'+pid).show();
           $('#del_'+pid).hide();
           $.post(url,{pid:pid},function(msg){
           });
       }
    </script>

</block>



